
import { Modal } from "@/components/base";
import type { ModalFuncProps } from "@/components/base";

const { confirm } = Modal;

/** 异步提示框 */
export const asyncConfirm = (props: ModalFuncProps) => new Promise<void>((resolve, reject) => {
    confirm({
        ...props,
        onOk: () => { resolve() },
        onCancel: () => { reject() },
    });
});